package net.sourceforge.peers.sip.syntaxencoding;

/**
 * 后缀参数的key
 */
public class SipHeaderParamName {

    private final String name;
    
    public SipHeaderParamName(String name) {
        this.name = name;
    }
    
    
    public String getName() {
        return name;
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        String objName="";
        if(obj instanceof SipHeaderParamName){
           objName = ((SipHeaderParamName)obj).getName();

        }
        return name.equalsIgnoreCase(objName);
    }
    
    @Override
    public int hashCode() {
        return name.toLowerCase().hashCode();
    }
    
    @Override
    public String toString() {
        return name;
    }
}
